import Vue from 'vue'
import Router from 'vue-router'
import store from '../store'

Vue.use(Router)

const router = new Router({
  routes: [
    { path: '/pointsMall', meta: { title: '积分商城' }, component: () => import('../pages/pointsMall/pointsMall') },
    { path: '/boutiquePointsMall', meta: { title: '精品积分' }, component: () => import('../pages/pointsMall/boutiquePointsMall.vue') },
    { path: '/myPoint', meta: { title: '积分商城' }, component: () => import('../pages/pointsMall/myPoint.vue') },
    { path: '/mySign', meta: { title: '签到中心' }, component: () => import('../pages/pointsMall/mySign.vue') },
    { path: '/pointsCar', meta: { title: '订单中心' }, component: () => import('../pages/pointsMall/pointsCar.vue') },
    { path: '/writeOrder', meta: { title: '普通礼品结算' }, component: () => import('../pages/pointsMall/writeOrder.vue') },
    { path: '/pointsDetails', meta: { title: '商品详情' }, component: () => import('../pages/pointsMall/pointsDetails.vue') },
    { path: '/succeChange', meta: { title: '礼品兑换' }, component: () => import('../pages/pointsMall/succeChange.vue') },
    { path: '/birdGoodsDetails', meta: { title: '商品详情' }, component: () => import('../pages/pointsMall/birdGoodsDetails.vue') },
    { path: '/PointsOrder', meta: { title: '历史订单' }, component: () => import('../pages/pointsMall/PointsOrder.vue') },
    { path: '/birdWriteOrder', meta: { title: '精品订单结算' }, component: () => import('../pages/pointsMall/birdWriteOrder.vue') },
    { path: '/excellentPoints', meta: { title: '积分商城' }, component: () => import('../pages/pointsMall/excellentPoints.vue') },
    { path: '/highQualityOrder', component: () => import('../pages/pointsMall/highQualityOrder.vue') },
    { path: '/loading', component: () => import('../pages/pointsMall/loading.vue') },
    { path: '/help', meta: { title: '帮助中心' }, component: () => import('../pages/help/help.vue') },
    // { path: '/register', meta: { title: '帮助中心' }, component: () => import('../pages/help/register.vue') },
    { path: '/register', component: () => import('../pages/help/register.vue') },
    { path: '/medicine', component: () => import('../pages/help/medicine.vue') },
    { path: '/Distribution', component: () => import('../pages/help/Distribution.vue') },
    { path: '/qualifications', component: () => import('../pages/help/qualifications.vue') },
    { path: '/payment', component: () => import('../pages/help/payment.vue') },
    { path: '/Return', component: () => import('../pages/help/Return.vue') },
    { path: '/onLine', component: () => import('../pages/help/onLine.vue') },
    { path: '/quality', component: () => import('../pages/help/quality.vue') },
    { path: '/service', component: () => import('../pages/help/service.vue') },
    { path: '/user', component: () => import('../pages/help/user.vue') },
    { path: '/brief', component: () => import('../pages/help/brief.vue') },
    { path: '/contact', component: () => import('../pages/help/contact.vue') },
    { path: '/advertisement', component: () => import('../pages/help/advertisement.vue') },
    // 用户协议
    { path: '/agreement', meta: { title: '用户协议', content: 'agre' }, component: () => import('../pages/agreement/agreement.vue') },
    // 隐私协议
    { path: '/Privacy', meta: { title: '隐私协议', content: 'priva' }, component: () => import('../pages/Privacy/Privacy.vue') },
    // 注销须知
    { path: '/cancellation', meta: { title: '注销须知', content: 'priva' }, component: () => import('../pages/cancellation/cancell.vue') },
    // 爆品金
    { path: '/boomIndex', meta: { title: '动销爆品' }, component: () => import('../pages/boomGold/boomIndex.vue') },
    { path: '/boomGoodsDetails', meta: { title: '商品详情' }, component: () => import('../pages/boomGold/boomGoodsDetails.vue') },
    { path: '/boomWriteOrder', meta: { title: '礼品单结算' }, component: () => import('../pages/boomGold/boomWriteOrder.vue') },
    { path: '/successOrder', meta: { title: '兑换成功' }, component: () => import('../pages/boomGold/successOrder.vue') },
    { path: '/logisticsDetails', meta: { title: '物流详情' }, component: () => import('../pages/boomGold/logisticsDetails.vue') },
    // 119
    { path: '/activeIndex', meta: { title: '主会场' }, component: () => import('../pages/119/activeIndex.vue') },
    { path: '/makeGroup', meta: { title: '拼团活动' }, component: () => import('../pages/119/makeGroup.vue') },
    { path: '/getCoupons', meta: { title: '优惠券' }, component: () => import('../pages/119/getCoupons.vue') },
    { path: '/toLotter', meta: { title: '转盘抽奖' }, component: () => import('../pages/119/toLotter.vue') },
    
    //砸金蛋活动
    { path: '/goldenEggs', meta: { title: '砸金蛋' }, component: () => import('../pages/goldenEggs/index.vue') },

    //邀请码页面
    { path: '/getCode', meta: { title: '邀好友赚红包' }, component: () => import('../pages/getCode/index.vue') },
    //每日特价
    { path: '/specials', meta: { title: '特价商品' }, component: () => import('../pages/specials/index.vue') },
    //扫街活动
    { path: '/streetSweeping', meta: { title: '活动特价' }, component: () => import('../pages/streetSweeping/index.vue') },
    //加盟权益
    { path: '/joinInterests', meta: { title: '加盟权益' }, component: () => import('../pages/joinInterests/index.vue') },
   //阶梯好价旧版
   { path: '/ladderPriceOld', meta: { title: '阶梯好价旧版' }, component: () => import('../pages/ladderPrice/index.vue') },
   //阶梯好价新版
   { path: '/ladderPrice', meta: { title: '阶梯好价' }, component: () => import('../pages/ladderPriceNew/index.vue') },
   //2021119拼团
   { path: '/collageold', meta: { title: '拼团' }, component: () => import('../pages/2021119/collage/index.vue') },
   //2022 拼团
   { path: '/collage', meta: { title: '拼团' }, component: () => import('../pages/2021119/collage2022/index.vue') },
   //10元限时购
   { path: '/limitedTimePurchase', meta: { title: '10元限时购' }, component: () => import('../pages/2021119/limitedTimePurchase/index.vue') },
    //119每日特价
   { path: '/specials119', meta: { title: '119特价商品' }, component: () => import('../pages/2021119/specials119/index.vue') },
    //119盲盒
   { path: '/blindBox', meta: { title: '119盲盒' }, component: () => import('../pages/2021119/blindBox/index.vue') },
     //119阶梯价
   { path: '/ladderPrice119', meta: { title: '阶梯好价' }, component: () => import('../pages/2021119/ladderPrice119/index.vue') },
     // 119数据大屏
   { path: '/largeDataScreen', meta: { title: '2021年合纵119嘉年华' }, component: () => import('../pages/2021119/largeDataScreen/index.vue') },
     // 119数据大屏没有加盟
   { path: '/largeDataScreenNo', meta: { title: '2021年合纵119嘉年华' }, component: () => import('../pages/2021119/largeDataScreenNo/index.vue') },
    // 119活动主会场
   { path: '/activeIndex2021', meta: { title: '活动主会场' }, component: () => import('../pages/2021119/activeIndex2021/index.vue') },
    // 《合纵药易购超级会员用户协议》
    { path: '/vipAgreement', meta: { title: '合纵药易购超级会员用户协议' }, component: () => import('../pages/vipAgreement/index.vue') },
    // 第三方共享信息表
    { path: '/sharedList', meta: { title: '第三方共享信息表' }, component: () => import('../pages/sharedList/index.vue') },
    // 活动专区
    { path: '/specialOffer', meta: { title: '特价专场' }, component: () => import('../pages/specialOffer/index.vue') },

   
  ]
})

router.beforeEach((to, form, next) => {
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})
// const router = new Router({
//   mode: Config.hash ? 'hash' : 'history',
//   routes: Routes.activity
// })

export default router

